In [1]:
import plotly.offline as pyo

from plotly.graph_objs import *

import chart_studio.plotly as py

import pandas as pd
from pandas import DataFrame
In [2]:
pyo.offline.init_notebook_mode()
In [3]:
gapMinder = py.get_figure("rmuir", 225)
lifeExp = py.get_figure("rmuir", 223)
In [5]:
gapMinder['layout'].update({'annotations' : [{'text' : "<i>Source: https://www.gapminder.org/data/</i>",
                                             'xref' : 'paper',
                                             'yref' : 'paper',
                                             'x' : 0,
                                             'y' : -0.4,
                                             'font' : {'size' : 12,
                                                      'color' : 'grey'},
                                              'xanchor' : 'left',
                                             'showarrow' : False}]})
pyo.iplot(gapMinder)
In [6]:
lifeExp['layout'].update({'annotations' : [{'text' : "<i>Source: The World Health Organisation (WHO)</i>",
                                             'xref' : 'paper',
                                             'yref' : 'paper',
                                             'x' : 0,
                                             'y' : -0.4,
                                             'font' : {'size' : 12,
                                                      'color' : 'grey'},
                                              'xanchor' : 'left',
                                             'showarrow' : False}]})
pyo.iplot(lifeExp)
In [7]:
lifeExp['layout'].update({'height' : 500, 'margin' : {'b' : 130}})
pyo.iplot(lifeExp)
In [ ]: